package com.cloud.api.domain.tsp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.core.entity.base.BaseEntity ;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author haohaibo
 * @since 2023-11-27
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_vehicle_owner")
@Schema(name = "VehicleOwner", description = "车主数据")
public class VehicleOwner extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @TableField("vin")
    @NotEmpty(message = "{validation.Information.vin}")
    @Size(max = 17,min = 17,message = "{validation.Information.vinSize}")
    private String vin;

    @Schema(description = "车牌号")
    @TableField("license_number")
    @Size(max = 15,message = "{validation.common.max}")
    private String licenseNumber;

    @Schema(description = "车主姓名")
    @TableField("car_owner")
    @NotEmpty(message = "{validation.owner.owner}")
    @Size(max = 50,message = "{validation.common.max}")
    private String carOwner;

    @Schema(description = "车主电话")
    @TableField("phone_number")
    @NotEmpty(message = "{validation.common.phone}")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",message = "{validation.common.phoneFormat}")
    private String phoneNumber;

}
